3.5.96 \(\int \frac {x^{-1+n}}{b x^n+c x^{2 n}} \, dx\) [496]

Optimal. Leaf size=23 \[ \frac {\log (x)}{b}-\frac {\log \left (b+c x^n\right )}{b n} \]

[Out]

ln(x)/b-ln(b+c*x^n)/b/n

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {1598, 272, 36, 29, 31} \begin {gather*} \frac {\log (x)}{b}-\frac {\log \left (b+c x^n\right )}{b n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^(-1 + n)/(b*x^n + c*x^(2*n)),x]

[Out]

Log[x]/b - Log[b + c*x^n]/(b*n)

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 1598

Int[(u_.)*(x_)^(m_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(m + n*p)*(a + b*x^(q -
 p))^n, x] /; FreeQ[{a, b, m, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rubi steps

\begin {align*} \int \frac {x^{-1+n}}{b x^n+c x^{2 n}} \, dx &=\int \frac {1}{x \left (b+c x^n\right )} \, dx\\ &=\frac {\text {Subst}\left (\int \frac {1}{x (b+c x)} \, dx,x,x^n\right )}{n}\\ &=\frac {\text {Subst}\left (\int \frac {1}{x} \, dx,x,x^n\right )}{b n}-\frac {c \text {Subst}\left (\int \frac {1}{b+c x} \, dx,x,x^n\right )}{b n}\\ &=\frac {\log (x)}{b}-\frac {\log \left (b+c x^n\right )}{b n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 25, normalized size = 1.09 \begin {gather*} \frac {\log \left (x^n\right )-\log \left (b n \left (b+c x^n\right )\right )}{b n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^(-1 + n)/(b*x^n + c*x^(2*n)),x]

[Out]

(Log[x^n] - Log[b*n*(b + c*x^n)])/(b*n)

________________________________________________________________________________________

Maple [A]
time = 0.20, size = 26, normalized size = 1.13

method result size
norman \(\frac {\ln \left (x \right )}{b}-\frac {\ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}+b \right )}{b n}\) \(26\)
risch \(\frac {\ln \left (x \right )}{b}-\frac {\ln \left (x^{n}+\frac {b}{c}\right )}{b n}\) \(26\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(-1+n)/(b*x^n+c*x^(2*n)),x,method=_RETURNVERBOSE)

[Out]

ln(x)/b-1/b/n*ln(c*exp(n*ln(x))+b)

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 27, normalized size = 1.17 \begin {gather*} \frac {\log \left (x\right )}{b} - \frac {\log \left (\frac {c x^{n} + b}{c}\right )}{b n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+n)/(b*x^n+c*x^(2*n)),x, algorithm="maxima")

[Out]

log(x)/b - log((c*x^n + b)/c)/(b*n)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 22, normalized size = 0.96 \begin {gather*} \frac {n \log \left (x\right ) - \log \left (c x^{n} + b\right )}{b n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+n)/(b*x^n+c*x^(2*n)),x, algorithm="fricas")

[Out]

(n*log(x) - log(c*x^n + b))/(b*n)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 42 vs. \(2 (15) = 30\).
time = 2.76, size = 42, normalized size = 1.83 \begin {gather*} \begin {cases} \frac {\log {\left (x \right )}}{c} & \text {for}\: b = 0 \wedge n = 0 \\- \frac {x^{- n}}{c n} & \text {for}\: b = 0 \\\frac {\log {\left (x \right )}}{b + c} & \text {for}\: n = 0 \\\frac {2 \log {\left (x \right )}}{b} - \frac {\log {\left (x^{n} + \frac {c x^{2 n}}{b} \right )}}{b n} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1+n)/(b*x**n+c*x**(2*n)),x)

[Out]

Piecewise((log(x)/c, Eq(b, 0) & Eq(n, 0)), (-1/(c*n*x**n), Eq(b, 0)), (log(x)/(b + c), Eq(n, 0)), (2*log(x)/b
- log(x**n + c*x**(2*n)/b)/(b*n), True))

________________________________________________________________________________________

Giac [A]
time = 5.83, size = 25, normalized size = 1.09 \begin {gather*} \frac {\log \left ({\left | x \right |}\right )}{b} - \frac {\log \left ({\left | c x^{n} + b \right |}\right )}{b n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+n)/(b*x^n+c*x^(2*n)),x, algorithm="giac")

[Out]

log(abs(x))/b - log(abs(c*x^n + b))/(b*n)

________________________________________________________________________________________

Mupad [B]
time = 1.37, size = 20, normalized size = 0.87 \begin {gather*} -\frac {2\,\mathrm {atanh}\left (\frac {2\,c\,x^n}{b}+1\right )}{b\,n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(n - 1)/(b*x^n + c*x^(2*n)),x)

[Out]

-(2*atanh((2*c*x^n)/b + 1))/(b*n)

________________________________________________________________________________________